package com.dcm.common.service.impl;

import com.dcm.common.service.LogService;
import com.dcm.common.vo.LogMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Component;

/**
 * @author:zhouyuhan
 * 时间: 2021/4/12 20:33
 */
@Component
public class LogServiceImpl implements LogService {
    @Autowired
    private MongoTemplate mongoTemplate;

    @Override
    public void writeLog(LogMessage log) {
        mongoTemplate.save(log);
    }
}
